plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
    id 'kotlin-parcelize'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.chskela.monoapplication"
        minSdk 26
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
        freeCompilerArgs = [
                '-opt-in=kotlin.RequiresOptIn',
        ]
    }
    buildFeatures {
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion compose_version
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.7.0'
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.0-alpha05'
    implementation 'androidx.activity:activity-compose:1.6.0-alpha01'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
    debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"

    implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0"

    implementation "com.google.dagger:hilt-android:2.40.5"
    kapt "com.google.dagger:hilt-compiler:2.40.5"
    implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'

    implementation "androidx.navigation:navigation-compose:2.5.0-alpha03"

    // Room
    implementation "androidx.room:room-runtime:2.4.2"
    kapt "androidx.room:room-compiler:2.4.2"

    // Kotlin Extensions and Coroutines support for Room
    implementation "androidx.room:room-ktx:2.4.2"

    // Preferences DataStore
    implementation "androidx.datastore:datastore-preferences:1.0.0"

    implementation 'com.google.accompanist:accompanist-systemuicontroller:0.24.3-alpha'

    // Splash API
    implementation 'androidx.core:core-splashscreen:1.0.0-beta02'
}
// to correct error types
kapt {
    correctErrorTypes true
}
// To enable the aggregating task
hilt {
    enableAggregatingTask = true
}